package com.youi.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.youi.shop.commons.result.RespEntity;
import com.youi.shop.pojo.entity.Cart;
import com.youi.shop.pojo.qo.cart.CartInsertQO;
import com.youi.shop.pojo.vo.cart.CartVO;

import java.util.List;

/**
 * <p>
 * 购物车表 服务类
 * </p>
 *
 * @author xxf
 * @since 2020-11-09
 */
public interface CartService extends IService<Cart> {

    /**
     * 根据会员id查询购物车信息
     * @param memberId
     * @return
     */
    RespEntity<List<CartVO>> selectByMemberId(Long memberId);

    /**
     * 将单个商品添加到购物车
     * @param cartInsertQO
     * @return
     */
    RespEntity<List<CartVO>> addOne(CartInsertQO cartInsertQO);

    /**
     * 根据购物车id查询
     * @param cartId
     * @return
     */
    Cart selectByCartId(Long cartId);
}
